package com.kuang.demo01;

public class Proxy implements Rent{  //Proxy代理角色，中介，会比真实角色（房东）多一些附属操作！
    //相当于spring-01-ioc1 中的Dao层
    private Host host;

    public Proxy() {
    }

    public Proxy(Host host) {
        this.host = host;
    }

    public Host getHost() {
        return host;
    }

    public void setHost(Host host) {
        this.host = host;
    }

    @Override
    public void rent(){
        this.host.rent();
    }

    public void seeHouse(){ //看房
        System.out.println("中介带你看房");
    }
    public void fare(){ //收中介费
        System.out.println("收中介费");
    }
}
